import Vuex from 'vuex';
import Vue from 'vue';
import user from './modules/user';
import companySetting from './modules/company-setting';
import employees from './modules/employees';
import structure from './modules/structure';

Vue.use(Vuex);

const state = {
  count: 1,
};

const mutations = {
  ADD_COUNT (state) {
    state.count++;
  },
};

const modules = {
  'user': user, // 键
  'company-setting': companySetting,
  'employees': employees,
  'structure': structure,
};

export default new Vuex.Store({
  state,
  mutations,
  modules,
});
